# -*- coding: utf-8 -*-
# @Time    : 2024/1/23  18:53
# @Author  : zhanghao
# @FileName: match_config.py
# @Software: PyCharm
"""
    Description: 匹配配置
"""
from domain.match_rule import MatchRule


class MatchConfig:

    version = ''
    name = ''
    rules: list[MatchRule] = []

    def __init__(self, version, name, rules):
        self.version = version
        self.name = name

        self.rules = []
        for rule in rules:
            match_rule = MatchRule(rule['type'], rule['keyword'], rule['retFileName'],
                                   rule['classifyId'], rule['grabContent'])
            self.rules.append(match_rule)



